<?php

use Illuminate\Database\Seeder;
use App\Model\Product;
class ProductsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Product::truncate();

        $faker = \Faker\Factory::create();

        for($i = 0;$i < 5; $i++){
            Product::create([
                'title' => $faker->sentence,
                'price' => $faker->randomFloat(),
                'simpledes' => $faker->sentence,
                'des' => $faker->sentence,
                'path' => $faker->sentence,
                'creator' => $faker->randomNumber(),
                'status' => 0
            ]);
        }
    }
}
